<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Mr.nico
  Date: 2022/1/5
  Time: 16:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
  <title>医生列表</title>
  <style>
    body{margin:5px;background-color: burlywood;}
    #main{background-image:url(images/bg/bg12.png);widtd:90%;margin:0 auto;min-height:800px;padding:0px 0px;}
    .a1{ text-align:center;color:blue;letter-spacing:10px;font-size:48px;font-family:华文行楷;line-height:120px;}
    .a1 span {color:red;}
    img{height:80px;}

    .right{position:absolute;top:40px;right:0px;}
    #nav{background-color:#330;line-height:40px;padding:0px 50px;font-size:14px}
    #nav a{color:white}
    #wall{padding:10px 50px;}
    td{text-align:center;border:none;border-bottom:1px dashed black}
    #pic{background-image:url(images/bg/bg14.jpg);width:500px;height:500px;margin:0 auto}
  </style>
  <script src="https://cdn.jsdelivr.net/npm/echarts@5.2.2/dist/echarts.js"></script>
</head>
<body>
<div id="main">

  <div id="wall">
    <h1 style="text-align:center">出诊量统计表</h1>
    <div id="pic">


    </div>
  </div>
</div>

<script type="text/javascript">
  // 基于准备好的dom，初始化echarts实例
  var myChart = echarts.init(document.getElementById('pic'));

  // 指定图表的配置项和数据
  option = {
    title: {
      text: '出诊量Top10',
      subtext: '2021年',
      left: 'center'
    },
    tooltip: {
      trigger: 'item'
    },
    legend: {
      orient: 'vertical',
      left: 'left'
    },
    series: [
      {
        name: 'Access From',
        type: 'pie',
        radius: '50%',
        data: [
          <c:forEach var="d" items="${list}">
          { value: 25, name: '${d.docName}' },
          </c:forEach>
        ],
        emphasis: {
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        }
      }
    ]
  };
  // 使用刚指定的配置项和数据显示图表。
  myChart.setOption(option);
</script>
</body>
</html>
